#pragma once

#include <gofcl_dma_ch_r.h>

// 必须保证cnt的高16位全为0。
static inline void dma_wreg_chxcnt(dma_qe dma_q, dma_ch_re channel_r,
				   u32_s cnt) {
	dma_wreg_ch(dma_q, channel_r, DMA_CH_CNT_RR, cnt);
}

static inline void dma_wreg_chxpaddr(dma_qe dma_q, dma_ch_re channel_r,
				     u32_s paddr) {
	dma_wreg_ch(dma_q, channel_r, DMA_CH_PADDR_RR, paddr);
}

static inline void dma_wreg_chxmaddr(dma_qe dma_q, dma_ch_re channel_r,
				     u32_s maddr) {
	dma_wreg_ch(dma_q, channel_r, DMA_CH_MADDR_RR, maddr);
}
